; Check Unit Type Custom

Check_Unit_Type_Custom:

	MOV 	R1, 0x6C
	MUL 	R2, R0, R1
	LDR 	R1, [CheckUnitSub]
	LDRB 	R1, [R1, R2]
	
	CMP 	R0, Unit_Infantry				; Is unit an Infantry?
	MOVEQ 	R0, 0							; If yes, don't highlight unit
	BEQ 	Unit_Is_Foot					
	
	CMP 	R0, Unit_Mech					; Is unit a Mech?
	MOVEQ 	R0, 0							; If yes, don't highlight unit
	BEQ 	Unit_Is_Foot
	
	CMP 	R1, Unit_Indirect_Vehicle		; Is unit a Indirect Combat?
	MOVEQ 	R0, 8							; If yes, highlight unit
	
	CMP 	R1, Unit_Direct_Vehicle			; Is unit a Direct Combat?
	MOVEQ 	R0, 7							; If yes, highlight unit
										
Unit_Is_Foot:	
	BX 		LR

CheckUnitSub:
	.dw 0x022F4FCC
		